<?php

$s_day    = date('d');
$s_month  = date('m');
$s_year   = date('Y');
$s_sec    = date('s');
$s_min    = date('i');
$s_hour   = date('H');

$now = date('Y m d H i s');

$sid  = $_GET[sid];
$data = $_GET[data];
if($sid > 0)
{
  $myFile = "data-".$sid.".txt";
  $fh = fopen($myFile, 'a') or die("can't open file");
  $temp = $now." ".$data."\n";
  fwrite($fh, $temp);
  fclose($fh);
}

//exit;

if($sid == 1)
{ 
	echo("NABTON_SID     1\n");
	echo("HB_VAL         10\n");
	echo("HB_UNIT        1\n");
	//echo("STEPPER_DIR    2 \n");
    //echo("STEPPER_STEPS  80\n");
    //echo("STEPPER_SPEED  2\n");
}
if($sid == 2)
{ 
	echo("NABTON_SID 2\n");
	echo("HB_VAL 10\n");
    echo("HB_UNIT        1\n");
    //echo("STEPPER_DIR    1 \n");
    //echo("STEPPER_STEPS  80\n");
    //echo("STEPPER_SPEED  2\n");
}
if($sid == 3)
{ 
	echo("NABTON_SID     3\n");
	echo("HB_VAL         10\n");
	echo("HB_UNIT        1\n");
	//echo("STEPPER_DIR    2 \n");
    //echo("STEPPER_STEPS  80\n");
    //echo("STEPPER_SPEED  2\n");
}
if($sid == 4)
{ 
	echo("NABTON_SID 4\n");
	echo("HB_VAL 10\n");
    echo("HB_UNIT        1\n");
    //echo("STEPPER_DIR    1 \n");
    //echo("STEPPER_STEPS  80\n");
    //echo("STEPPER_SPEED  2\n");
}
if($sid == 5)
{ 
	echo("NABTON_SID 5\n");
    echo("HB_VAL 10\n");
    echo("HB_UNIT  5\n");
    //echo("STEPPER_DIR    1 \n");
    //echo("STEPPER_STEPS  80\n");
    //echo("STEPPER_SPEED  2\n");
}




?>
